using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Web;



namespace Controale
{
    public class FereastraControl:Control
    {
        public string textura;
        public Color culoare;
        public string privacyGlass;

        public string texturiFilePath;
        public string privacyGlassFilePath;

        public FereastraControl()
        {
            //this.CanSelect = true;
            //this.Location = new Point(50,50);
            this.ResizeRedraw = true;
            this.Paint+=new PaintEventHandler(Desenare);
            
            //this.texturiFilePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
            //this.texturiFilePath += ("\\texturi lemnoase");

            //this.privacyGlassFilePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
            //this.privacyGlassFilePath += ("\\privacy glass");
            culoare = Color.AliceBlue;
        }
        void Desenare(object s, PaintEventArgs e)
        {
            Graphics g = e.Graphics;
            
            Pen p = new Pen(culoare,5);
            Rectangle r=this.DisplayRectangle;

            this.textura=System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
            this.textura += ("\\texturi lemnoase\\clear pine.bmp");

            Image image=new Bitmap(textura);
            TextureBrush tb=new TextureBrush(image,r);
            g.DrawRectangle(p,r);
            g.FillRectangle(tb, r);
        }
    }
}
